import { StoreKeys } from "@/common/enum";
import { defineStore } from "pinia";
import { computed, ref } from "vue";

export const useCount = defineStore(StoreKeys.count, () => {
  const count = ref(0);
  const firstName = ref("");
  const lastName = ref("");
  const fullName = computed(() => firstName.value + lastName.value);

  function add() {
    count.value++;
  }

  return { count, fullName, add };
});
